import React, { Component } from 'react';
import Slider from "react-slick";


import './slick.min.css'
import './slick-theme.min.css'
import './index.css'

export default class SimpleSlider extends Component {
  // constructor(props) {
  //   super(props);
  //   // this.state = {
  //   //   slides: [1, 2, 3, 4, 5, 6, 7]
  //   // };
  // }
  render() {
    let { list } = this.props;
    var settings = {
      infinite: true,
      slidesToShow: 5,
      slidesToScroll: 1,
      autoplay: true,
      speed: 1000,
      autoplaySpeed: 1000,
      vertical: true,
      nextArrow: '',
      prevArrow: '',
      verticalSwiping: false,
      beforeChange: function (currentSlide, nextSlide) {
        // console.log("before change", currentSlide, nextSlide);
      },
      afterChange: function (currentSlide) {
        // console.log("after change", currentSlide);
      }
    };
    return (
      <div className='slider_con'>
        <div className='slider_tit'>中奖纪录</div>
        <Slider {...settings}>
          {list.map(function (item,index) {
            return (
              <div key={index} className='slider_item' >{item}</div>
            );
          })}
        </Slider>
        <div className='slider_foot'></div>
      </div>
    );
  }
}